home *** CD-ROM | disk | FTP | other *** search
/ PC User 2003 December / Australian PC User - December 2003 (CD2).iso / software / apps / files / dwmx2k4.exe / Disk1 / data1.cab / Configuration_En / Inspectors / aspnet.js < prev    next >
Encoding:
JavaScript  |  2003-09-05  |  1.3 KB  |  59 lines

  1. //Copyright 2001, 2002, 2003 Macromedia, Inc. All rights reserved.
  2.  
  3. // *********** GLOBAL VARS *****************************
  4.  
  5. var helpDoc = MM.HELP_inspGeneric;
  6.  
  7. // ******************** API ****************************
  8. function canInspectSelection(){
  9.  
  10.     var dom = dw.getDocumentDOM();
  11.     var theObj = dom.getSelectedNode();
  12.  
  13.     var translatorClass;
  14.     var lockType;
  15.  
  16.     if ( theObj.nodeType != Node.ELEMENT_NODE )
  17.     {
  18.         return false; 
  19.     }
  20.  
  21.     translatorClass = theObj.getAttribute("translatorClass");
  22.     if ( translatorClass != "MM_ASPNETSCRIPT" )
  23.     {
  24.         return false;
  25.     }
  26.  
  27.     lockType = theObj.getAttribute("type");
  28.     if ( lockType != "script")
  29.     {
  30.         return false;
  31.     }
  32.  
  33.     return true;
  34. }
  35.  
  36. function inspectSelection(){
  37.   showHideTranslated();
  38. }
  39.  
  40.  
  41. // ******************** LOCAL FUNCTIONS ****************************
  42.  
  43. function launchASPNetEditDialog(){
  44.   var dom = dw.getDocumentDOM();
  45.   var theObj = dom.getSelectedNode();
  46.   origAttr        = theObj.getAttribute("ORIG");
  47.   aspStr            = unescape( origAttr );
  48.   MM.editContents=aspStr;
  49.   dw.popupCommand("EditContent");
  50.   if (MM.retVal == "OK"){
  51.   //update the node in the dom.
  52.     curSelection    = dreamweaver.getSelection();
  53.     dw.editLockedRegions(curSelection);
  54.     theObj.setAttribute("ORIG",escape(MM.editContents));
  55.   }
  56. }
  57.  
  58.  
  59.